﻿@model IEnumerable<YTCMS.Domain.Entities.cmscolumn>
@using YTCMS.Core;

<table id="sample-table-1" class="table table-striped table-bordered table-hover">
    <thead>
        <tr>
            <th class="center">
                <label>
                    <input type="checkbox" class="ace" />
                    <span class="lbl"></span>
                </label>
            </th>
            <th>栏目标题</th>
            <th>栏目英文标题</th>
            <th>Code</th>
            <th>创建时间</th>
            <th>ICON</th>
            <th>状态</th>
            <th>排序</th>
            <th>所属模块</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        @{
            if (Model.Any())
            {
                foreach (var item in Model)
                {
                    <tr>
                        <td class="center">
                            <label>
                                <input type="checkbox" class="ace" />
                                <span class="lbl"></span>
                            </label>
                        </td>

                        <td>
                            <a href="#">@item.Title</a>
                        </td>
                        <td>
                            @item.ETitle
                        </td>
                        <td>
                            @item.Code
                        </td>
                        <td>@item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")</td>
                        <td>@item.Icon</td>

                        <td>@Enum.GetName(typeof(YTCMS.Core.CommonState), item.State) </td>
                        <td>@item.Sort</td>
                        <td>
                            @item.module.ExtendFile("Name")
                        </td>
                        <td>
                            <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
                                <a class="purple defaultDOMWindow" href="/CmsColumn/SetProduct?cid=@item.Id" title="选择线路">
                                    <i class="icon-plus-sign purple bigger-120"></i>选择线路
                                </a>
                                <a class="green" href="/Cmscolumn/edit?id=@item.Id" title="修改">
                                    <i class="icon-edit bigger-120"></i>修改
                                </a>
                                <a class="btn btn-xs btn-danger" href="javascript:void(0)" onclick="WZTDelete('/Cmscolumn/Delete', {id:@item.Id})">
                                    <i class="icon-trash bigger-120"></i>删除
                                </a>
                            </div>


                        </td>
                    </tr>
                }
            }

        }


    </tbody>
</table>
@Html.AjaxPager((int)ViewBag.PageSize, (int)ViewBag.TotalCount)

<script>
    $(function () {
        $(".defaultDOMWindow").openDOMWindow({
            height: 900,
            width: 1200,
            //positionType: 'fixed',
            //positionTop: 200,
            //positionLeft:400,
            eventType: 'click',
            loader: 1,
            loaderHeight: 16,
            loaderWidth: 17,
            windowSource: 'ajax',
            windowHTTPType: 'get'



        });
    })
</script>